<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>      
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<link rel="stylesheet"  href="${host_url}/css/app/common.css">
<link rel="stylesheet"  href="${host_url}/css/app/coupon_details.css">
<link rel="stylesheet"  href="${host_url}/css/app/dropload.css">
<script src="${host_url}/js/app/jquery.min.js"></script>
<script src="${host_url}/js/app/common.js"></script>
<script src="${host_url}/js/app/dropload.min.js"></script> 
<script type="text/javascript">
  document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/50 + 'px';
</script>
<script type="text/javascript">
var os="${os}";
<c:if test="${os=='ios'|| os=='android'}">
function fn_goConnPage(id){
	  var incomeAndExpensesLogOne_url = $("#incomeAndExpensesLogOne_url").val();
		 window.webkit.messageHandlers.ios_open_page.postMessage('WKViewController:::url->'+incomeAndExpensesLogOne_url+'?incomeAndExpenses_id='+id+':::webTitle->交易明细:::isRefresh->YES');
}  

function fn_goConnPage1(order_id,order_state,order_payType,order_orderTyp) {
	window.webkit.messageHandlers.ios_open_page.postMessage('NewOrderDetailViewController:::orderId->'+order_id+':::state->'+order_state+':::payType->'+order_payType+':::orderType->'+order_orderTyp);
}	
</c:if>
</script>
<title>交易明细</title>
</head>
<body>	
<input type="hidden"  id="incomeAndExpensesLogOne_url" value="${incomeAndExpensesLogOne_url }">
    <p class="clearfix title-2">
    	<c:if test="${incomeAndExpensesOne.bill_type == 1}">
        	<span class="leftArea">出账金额</span>
        	<span class="rightArea">${incomeAndExpensesOne.free_cash}</span>
        </c:if>
	    <c:if test="${incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.award == null}"> 
	    	<span class="leftArea">入账金额</span>
	    	<span class="rightArea enter"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></span>
	    </c:if> 
	    <c:if test="${incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.award != null}"> 
	    	 <c:if test="${incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.award == 2 and membeInfo.special_yn!='Y'}"> 
		    	<span class="leftArea">入账金额</span>
		    	<span class="rightArea enter"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></span>
		     </c:if> 
	    	 <c:if test="${incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.award != 2}"> 
		    	<span class="leftArea">入账金额</span>
		    	<span class="rightArea enter"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></span>
		     </c:if> 
	         <c:if test="${incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.award == 2 and membeInfo.special_yn=='Y'}"> 
	            <span class="leftArea">入账金额</span>
	    	    <c:if test="${membeInfo.member_id !='758' }"> 
					<span class="rightArea enter"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash-incomeAndExpensesOne.capital_cash}" pattern="#0.00" maxFractionDigits="2"/></span>         
				</c:if>
				<c:if test="${membeInfo.member_id =='758' }"> 
					<span class="rightArea enter"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></span>         
				</c:if>
	          </c:if>
	    </c:if> 
	   
    </p>
    <ul class="content3">
        <li class="clearfix">
            <p class="leftArea">类<span>站位</span>型</p>
            <p class="rightArea">
                <c:if test="${incomeAndExpensesOne.type == 1 and incomeAndExpensesOne.pay_type == null}">离线充值</c:if>
                <c:if test="${incomeAndExpensesOne.type == 1 and incomeAndExpensesOne.pay_type != null}">余额充值</c:if>
                <c:if test="${incomeAndExpensesOne.type == 2}">${incomeAndExpensesOne.award_name}</c:if>
                <c:if test="${incomeAndExpensesOne.type == 3}">退款</c:if>
                <c:if test="${incomeAndExpensesOne.type == 4}">余额提现</c:if>
                <c:if test="${incomeAndExpensesOne.type == 5}">商城购物</c:if>
                <c:if test="${incomeAndExpensesOne.type == 6}">${ticket_name}充值</c:if>
            </p>
        </li>   
        <li class="clearfix">
            <p class="leftArea">状<span>站位</span>态</p>
            <p class="rightArea">
                <c:if test="${incomeAndExpensesOne.type == 2}">已入账</c:if>
                <c:if test="${incomeAndExpensesOne.type == 3 and incomeAndExpensesOne.bill_type == 2}">已退款</c:if>
                <c:if test="${(incomeAndExpensesOne.type == 1 and incomeAndExpensesOne.bill_type == 2)or(incomeAndExpensesOne.type == 6 and incomeAndExpensesOne.bill_type == 1)}">充值成功</c:if>
                <c:if test="${incomeAndExpensesOne.type == 4 and incomeAndExpensesOne.bill_type == 1 and incomeAndExpensesOne.state==2 and incomeAndExpensesOne.log_cash_draw_state == 2}">提现失败</c:if>
                <c:if test="${incomeAndExpensesOne.type == 4 and incomeAndExpensesOne.bill_type == 1 and incomeAndExpensesOne.state == 2 and incomeAndExpensesOne.log_cash_draw_state == 1}">提现成功</c:if>
                <c:if test="${incomeAndExpensesOne.type == 4 and incomeAndExpensesOne.bill_type == 1 and incomeAndExpensesOne.state == 2 and incomeAndExpensesOne.log_cash_draw_state == 0}">提现中</c:if>
                <c:if test="${incomeAndExpensesOne.type == 5 and incomeAndExpensesOne.bill_type == 1}">支付成功</c:if>
            </p>
        </li>
        <li class="clearfix">
            <p class="leftArea">创建时间</p>
            <p class="rightArea">${incomeAndExpensesOne.create_time}</p>
        </li>
        <li class="clearfix">
            <p class="leftArea">交易单号</p>
            <p class="rightArea">${incomeAndExpensesOne.no}</p>
        </li>
        <c:if test ="${incomeAndExpensesOne.type == 2}">
	        <li class="clearfix">
	            <p class="leftArea">对方账号</p>
	            <p class="rightArea new-style">${incomeAndExpensesOne.buy_member_nick_name}</p>
	        </li>
        </c:if>
         <c:if test ="${incomeAndExpensesOne.award != 2}">
	        <li class="clearfix">
	            <p class="leftArea">摘<span>站位</span>要</p>
	            <p class="rightArea">${incomeAndExpensesOne.remark}</p>
	        </li>
        </c:if>
         <c:if test ="${incomeAndExpensesOne.award == 2}">
	        <li class="clearfix">
	            <p class="leftArea">摘<span>站位</span>要</p>
	            <p class="rightArea">好友充值${incomeAndExpensesOne.ticket}${ticket_name}</p>
	        </li>
        </c:if>
        <c:if test ="${incomeAndExpensesOne.type == 2}">
        <c:if test="${incomeAndExpensesOne.award == 3 or incomeAndExpensesOne.award == 4 or incomeAndExpensesOne.award == 5 or incomeAndExpensesOne.award == 6 or incomeAndExpensesOne.award == 7 or incomeAndExpensesOne.award == 8or incomeAndExpensesOne.award == 9}">
            <li class="clearfix">
                <p class="leftArea bor-l">佣金比例</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.rate*100}" pattern="#0.0" maxFractionDigits="1"/>%</p>
            </li>
            <li class="clearfix">
                <p class="leftArea bor-l">现金收益</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></p>
            </li>
         </c:if>
         <c:if test="${incomeAndExpensesOne.award == 1}">
            <li class="clearfix">
                <p class="leftArea bor-l">现金收益</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.free_cash}" pattern="#0.00" maxFractionDigits="2"/></p>
            </li>
         </c:if>
       <c:if test="${incomeAndExpensesOne.award == 2}">
            <li class="clearfix">
                <p class="leftArea bor-l">出售${ticket_name}</p>
                <p class="rightArea">${incomeAndExpensesOne.ticket}</p>
            </li>
            <li class="clearfix">
                <p class="leftArea bor-l">出售${ticket_name}类型</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.sell_rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
            </li>
            <li class="clearfix">
                <p class="leftArea bor-l">买方购入${ticket_name}类型</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.buy_rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
            </li>
            <li class="clearfix">
                <p class="leftArea bor-l">总收益</p>
                <p class="rightArea">${incomeAndExpensesOne.earn}</p>
            </li>
            <li class="clearfix">
                <p class="leftArea bor-l">--本金</p>
                <p class="rightArea">${incomeAndExpensesOne.capital_cash}</p>
            </li>     
            <li class="clearfix">
                <p class="leftArea bor-l">--利润</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.profit_cash - incomeAndExpensesOne.buy_cash}" pattern="#0.00" maxFractionDigits="2"/></p>
            </li>
         </c:if>
         <c:if test="${incomeAndExpensesOne.award == 2 or incomeAndExpensesOne.award == 3 or incomeAndExpensesOne.award == 4}"> 
            <li class="clearfix">
                <p class="leftArea bor-l">--${shopping_money_name}</p>
                <p class="rightArea">${incomeAndExpensesOne.buy_cash}</p>
            </li>         
         </c:if>
         <c:if test="${incomeAndExpensesOne.award == 2 and membeInfo.special_yn=='Y' and membeInfo.member_id !='758'}"> 
            <li class="clearfix">
                <p class="leftArea bor-l">本金返还</p>
                <p class="rightArea">${incomeAndExpensesOne.capital_cash}</p>
            </li>         
         </c:if>
         </c:if>
         <c:if test="${incomeAndExpensesOne.type == 4 and incomeAndExpensesOne.bill_type == 1}">
             <li class="clearfix">
                <p class="leftArea bor-l">提现账户</p>
                <p class="rightArea">${incomeAndExpensesOne.draw_account}（${incomeAndExpensesOne.bank_name}）</p>
             </li>
         </c:if>
         <c:if test="${(incomeAndExpensesOne.type == 3 and incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.state == 2 and incomeAndExpensesOne.reason != null) or (incomeAndExpensesOne.type == 4 and incomeAndExpensesOne.bill_type == 1 and incomeAndExpensesOne.log_cash_draw_state == 2)}">
             <li class="clearfix">
                <p class="leftArea bor-l">失败原因</p>
                <p class="rightArea">${incomeAndExpensesOne.reason}</p>
             </li>
             <li class="clearfix">
                <p class="leftArea bor-l">关联交易</p>
            <c:if test="${'ios'==os}">
	            <p class="rightArea col-" onclick="fn_goConnPage(${incomeAndExpensesOne.page_conn_id})">${incomeAndExpensesOne.conn_no}</p>
	        </c:if>
	         <c:if test="${'wechat'==os ||'web'==os}">
		    	<p class="rightArea col-"  id='{"name":"weOpenDetailPage", "params": {"income_id":${incomeAndExpensesOne.page_conn_id }}}' >${incomeAndExpensesOne.conn_no}</p>
		    </c:if>
		    <c:if test="${'android'==os}">
		    	<p class="rightArea col-" onclick="android.startUrl('交易明细','${incomeAndExpensesLogOne_url}','incomeAndExpenses_id->${incomeAndExpensesOne.page_conn_id}')">${incomeAndExpensesOne.conn_no}</p>
		    </c:if>
             </li>             
         </c:if>         
         <c:if test="${(incomeAndExpensesOne.bill_type == 2 and incomeAndExpensesOne.type == 3 and incomeAndExpensesOne.state == 2 and incomeAndExpensesOne.reason == null) or (incomeAndExpensesOne.type==5 and incomeAndExpensesOne.bill_type == 1 and incomeAndExpensesOne.state == 2)}">
             <li class="clearfix">
                <p class="leftArea bor-l">关联交易</p>
	            <c:if test="${'ios'==os}">
		            <p class="rightArea col-" onclick="fn_goConnPage1('${incomeAndExpensesOne.order_id}','${incomeAndExpensesOne.order_state}','${incomeAndExpensesOne.order_payType}','${incomeAndExpensesOne.order_orderTyp}')">订单号：${incomeAndExpensesOne.order_no}</p>
		        </c:if>
		         <c:if test="${'wechat'==os ||'web'==os}">
			    	<p class="rightArea col-" id='{"name":"weOpenOrderPage", "params": {"orderId":${incomeAndExpensesOne.order_id }}}' >订单号：${incomeAndExpensesOne.order_no}</p>
			    </c:if>
			    <c:if test="${'android'==os}">
			    	<p class="rightArea col-" onclick="android.openPage('com.uniplaza.fenx.mmine.order.activity.MineOrderDetailActivity:::order_id->${incomeAndExpensesOne.order_id}')">订单号：${incomeAndExpensesOne.order_no}</p>
			    </c:if>
             </li>
         </c:if>
         <c:if test="${incomeAndExpensesOne.type == 6 and incomeAndExpensesOne.bill_type == 1}">
             <li class="clearfix">
                <p class="leftArea bor-l">${ticket_name}数量</p>
                <p class="rightArea">${incomeAndExpensesOne.ticket}</p>
             </li>
             <li class="clearfix">
                <p class="leftArea bor-l">${ticket_name}类型</p>
                <p class="rightArea"><fmt:formatNumber value="${incomeAndExpensesOne.ticket_rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
             </li>                      	
         </c:if>         
        <c:if test="${(incomeAndExpensesOne.type == 1 and incomeAndExpensesOne.bill_type == 2) or (incomeAndExpensesOne.type == 6 and incomeAndExpensesOne.bill_type == 1)}">
             <c:if test="${incomeAndExpensesOne.pay_type !=null}">
             <li class="clearfix">
                <p class="leftArea bor-l">支付方式</p>
                <p class="rightArea">
	                <c:if test="${incomeAndExpensesOne.pay_type == 1}">账户余额</c:if>
	                <c:if test="${incomeAndExpensesOne.pay_type == 2}">支付宝</c:if>
	                <c:if test="${incomeAndExpensesOne.pay_type == 3}">微信</c:if>
                </p>
             </li>
             </c:if>
         </c:if>                                                                           	      	     	      
    </ul>
</body>
</html>